<!--{eval $_TPL['titles'] = array(lang('polls'));}-->
<!--{template header}-->

<!--{if !empty($_SGLOBAL[inajax])}-->
	<div id="space_poll">
		<h3 class="feed_header">
			<a href="cp.php?ac=poll" class="r_option">{lang topic_poll}</a>
			{lang poll} ({lang total} $count {lang units})</h3>
		<!--{if $list}-->
		<ul class="line_list">
		<!--{loop $list $value}-->
			<li>
				<span class="gray r_option">{$value[voternum]} {lang polls_num}</span>
				<h4><a href="space.php?uid=$space[uid]&do=poll&pid=$value[pid]">$value[subject]</a></h4>
				<div class="detail">
				 <!--{loop $value['option'] $val}-->
					<p><input type="<!--{if $value[multiple]}-->checkbox<!--{else}-->radio<!--{/if}-->" disabled name="poll_$value[pid]"/> $val</p>
				 <!--{/loop}-->
				</div>
			</li>
		<!--{/loop}-->
		</ul>
		<div class="page">$multi</div>
		
		<!--{else}-->
		<div class="c_form">{lang no_related_polls}</div>
		<!--{/if}-->
	</div><br>
<!--{else}-->

<!--{if $space[self]}-->
<div class="searchbar floatright">
<form method="get" action="space.php">
	<input name="searchkey" value="" size="15" class="t_input" type="text">
	<input name="searchsubmit" value="{lang search_polls}" class="submit" type="submit">
	<input type="hidden" name="searchmode" value="1" />
	<input type="hidden" name="do" value="poll" />
	<input type="hidden" name="view" value="new" />
</form>
</div>
<h2 class="title"><img src="image/app/poll.gif" />{lang polls}</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li$actives[new]><a href="space.php?uid=$space[uid]&do=$do&view=new"><span>{lang last_polls}</span></a></li>
		<li$actives[hot]><a href="space.php?uid=$space[uid]&do=$do&view=hot"><span>{lang hot_polls}</span></a></li>
		<li$actives[reward]><a href="space.php?uid=$space[uid]&do=$do&view=reward"><span>{lang poll_reward}</span></a></li>
		<!--{if $space[friendnum]}--><li$actives[friend]><a href="space.php?uid=$space[uid]&do=$do&view=friend"><span>{lang friends_polls}</span></a></li><!--{/if}-->
		<li$actives[me]><a href="space.php?uid=$space[uid]&do=$do&view=me"><span>{lang my_polls}</span></a></li>
		<li class="null"><a href="cp.php?ac=poll">{lang topic_poll}</a></li>
	</ul>
</div>
<!--{else}-->
<!--{eval 
	$_TPL['spacetitle'] = "{lang polls}";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=$do&view=me\">{lang author_all_polls}</a>";
}-->
<!--{template space_menu}-->
<div class="h_status">{lang polls_ordered_by_time}</div>
<!--{/if}-->

<!--{if $space[self] && in_array($_GET['view'], array('me', 'hot'))}-->
<div class="h_status">
	<!--{if $_GET['view'] == 'hot'}-->
	{lang range}: 
	<a href="space.php?uid=$space[uid]&do=$do&view=hot&filtrate=all"$filtrate[all]>{lang all}</a>
	<span class="pipe">|</span><a href="space.php?uid=$space[uid]&do=$do&view=hot&filtrate=week"$filtrate[week]>{lang hot_this_week}</a>
	<span class="pipe">|</span><a href="space.php?uid=$space[uid]&do=$do&view=hot&filtrate=month"$filtrate[month]>{lang hot_this_month}</a>
	<!--{else}-->
	{lang type}: 
	<a href="space.php?uid=$space[uid]&do=$do&view=me"$filtrate[me]>{lang started_by_me}</a>
	<span class="pipe">|</span><a href="space.php?uid=$space[uid]&do=$do&view=me&filtrate=join"$filtrate[join]>{lang i_took_part}</a>
	<span class="pipe">|</span><a href="space.php?uid=$space[uid]&do=$do&view=me&filtrate=expiration"$filtrate[expiration]>{lang expired_allready}</a>
	<!--{/if}-->
</div>
<!--{/if}-->

<!--{if $searchkey}-->
<div class="h_status">{lang following_search_poll} <span style="color:red;font-weight:bold;">$searchkey</span> {lang results_list}</div>
<!--{/if}-->
	
<div id="content" style="width:100%;">
	<!--{if $count}-->
	<div class="poll_list">
		<ul>
		<!--{loop $list $value}-->
			<li>
				<div class="poll_user">
				<div class="avatar48"><a href="space.php?uid=$value[uid]"><!--{avatar($value[uid],small)}--></a></div>
				<p><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a></p>
				</div>
				<div class="poll_content">

					<h4>
						<!--{if $value[percredit]}--><span class="poll_reward">+$value[percredit]</span><!--{/if}--><a href="space.php?uid=$value[uid]&do=$do&pid=$value[pid]">$value[subject]</a>
					</h4>
					<div class="poll_options">
						<ol>
						 <!--{loop $value['option'] $val}-->
							<li><input type="<!--{if $value[multiple]}-->checkbox<!--{else}-->radio<!--{/if}-->" disabled name="poll_$value[pid]"/> $val</li>
						 <!--{/loop}-->
							<li>{lang 3dots}</li>
						 </ol>
						 <p>
						 	<span class="gray"><!--{date('Y-m-d H:i',$value[dateline],1)}--></span>
						 	<span class="pipe">|</span>
						 	<a href="space.php?uid=$value[uid]&do=$do&pid=$value[pid]#comment">{lang comment} ($value[replynum])</a>
						 	<!--{if $_GET[view]=='me'&&$value[expiration]&&$value[expiration]<$_SGLOBAL[timestamp]}-->
						 	<span class="pipe">|</span>
						 	<span class="gray">{lang poll_finished}</span><!--{if empty($value[summary])}-->&nbsp;<a class="green" href="space.php?uid=$value[uid]&do=$do&pid=$value[pid]">{lang write_poll_summary_go}</a><!--{/if}-->
						 	<!--{/if}-->
						 </p>
					</div>
				</div>
				<div class="poll_status">
					<a href="space.php?uid=$value[uid]&do=$do&pid=$value[pid]" class="poll_joins pj_<!--{eval echo random(1, 1)}-->"><span>$value[voternum]</span> {lang poll_participants}</a> <a href="space.php?uid=$value[uid]&do=$do&pid=$value[pid]" class="go2_poll">{lang go_to_poll}</a>
				</div>
			</li>
		<!--{/loop}-->
			
		</ul>
	</div>
	
	<div class="page">$multi</div>
	
	<!--{else}-->
	<div class="c_form">{lang no_related_polls}</div>
	<!--{/if}-->

</div>
<!--{/if}-->

<!--{template footer}-->